CC            = gcc
CXX           = g++

CFLAGS        = -ggdb -Wall -W 
CXXFLAGS      = -ggdb -Wall -W 

PREFIX=/usr/local
EXEC_PREFIX=$(PREFIX)
includedir_old=$(PREFIX)/include/opencv
includedir_new=$(PREFIX)/include

LIBS = $(EXEC_PREFIX)/lib/libopencv_calib3d.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_contrib.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_core.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_features2d.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_flann.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_gpu.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_highgui.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_imgproc.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_legacy.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_ml.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_nonfree.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_objdetect.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_photo.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_stitching.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_ts.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_video.so 
LIBS += $(EXEC_PREFIX)/lib/libopencv_videostab.so

INCLUDES +=-I$(includedir_old) -I$(includedir_new)

SRCS=openCap.cpp
OBJS=openCap.o

TAG=openCap

all:
	$(CXX) -o $(TAG) $(SRCS) $(CFLAGS) $(INCLUDES) $(LIBS)

clean:
	rm -f $(TAG) $(OBJS)
